import React from 'react'
import { Router, Route} from 'react-router-dom'
import createBrowserHistory from 'history/createBrowserHistory'

import home from '../views/admin/home/index.js'
const history = createBrowserHistory()

 
class RouteMap extends React.Component {
    updateHandle() {
        console.log('每次router变化之后都会触发')
    }
    render() {
        return (
             <Router history={history} onUpdate={this.updateHandle.bind(this)} >
             	<div>
	                <Route path='/abd' component={home} children={({ home }) => (
					    <li className='childHome'>
					      <Route path="home" component={home}/>
					    </li>
					  )}>
	                </Route>
	                <Route path="/abc" component={home}/>
                </div>
            </Router>
        )
    }
}
 
export default RouteMap